package com.sso.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author
 * @description
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {
    /**
     * 文件访问
     */
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {

        registry.addResourceHandler("/data/**")
//                .addResourceLocations("file:/D:/Java/workspace/vx_official_accounts/matirials/");
                .addResourceLocations("file:"+ "/home/text2/data/");
    }

}
